import Home from '@/components/Home/Home'

export const OrtherPage = {
  path     : '/',
  name     : 'home',
  component: Home,
  // redirect : '/onlineApplyCatalogs/onlineApply',
  children : [
    {
      path     : 'component',
      name     : 'Component',
      title    : '企业申請實例通用組件',
      component: resolve => {require(['@/components/Component/Component'], resolve);}
    },
    {
      path     : 'otherComponent',
      name     : 'otherComponent',
      title    : '事业申請實例通用組件',
      component: resolve => {require(['@/components/Component/otherComponent'], resolve);}
    },
    {
      path     : '/notification/noticeInfo',
      name     : 'noticeInfo',
      component: resolve => {require(['@/components/PlatformManagement/notice/noticeInfo'], resolve);},
    },
    {
      path     : '/notification/group',
      name     : 'group',
      component: resolve => {require(['@/components/PlatformManagement/notice/group'], resolve);},
    },
    {
      path     : '/notification/publish',
      name     : 'group',
      component: resolve => {require(['@/components/PlatformManagement/notice/publish'], resolve);},
    },
    {
      path     : 'editProcess',
      name     : 'editProcess',
      title    : '单个环节变更',
      component: resolve => {require(['@/components/OfflineChk/ReviewProcess/editProcess'], resolve);},
    },
    {
      path     : 'blockList',
      name     : 'blockList',
      title    : '企业黑名单',
      component: resolve => {require(['@/components/Setting/blockList'], resolve);},
    },
    {
      path     : 'scheduleContact',
      name     : 'scheduleContact',
      title    : '政府对接人',
      component: resolve => {require(['@/components/Setting/scheduleContact'], resolve);},
    },
    {
      path     : 'changePw',
      name     : 'changePw',
      title    : '修改密码',
      component: resolve => {require(['@/components/Setting/changePw'], resolve);},
    },
    {
      path     : 'policyDetail/:fundListId',
      name     : 'policyDetail',
      title    : '政策详情',
      component: resolve => {require(['@/components/OnlineApply/policyDetail'], resolve);},
    }
  ]
}


export const appRouter = [
  {
    title    : '政策',
    path     : '/releasePolicyCatalog',
    name     : 'releasePolicyCatalog',
    icon     : 'icon-fabu',
    component: Home,
    children : [
      {
        title    : '发布政策',
        path     : 'releasePolicy',
        name     : 'releasePolicy',
        admin    : true,
        component: resolve => {require(['@/components/releasePolicy/releasePolicy'], resolve);}
      },
      {
        title    : '在线政策',
        path     : 'onlinePolicy',
        name     : 'onlinePolicy',
        component: resolve => {require(['@/components/OnlineApply/onlinePolicy'], resolve);}
      },
    ]
  },

  {
    title    : '线上申请',
    path     : '/onlineApplyCatalogs',
    name     : 'onlineApplyCatalogs',
    icon     : 'icon-xianshangshenqing-',
    component: Home,
    children : [
      {
        title    : '查看企业线上申请',
        path     : 'onlineApply',
        name     : 'onlineApply',
        component: resolve => {require(['@/components/OnlineApply/OnlineApply'], resolve);}
      },
      {
        title    : '查看事业线上申请',
        path     : 'otherOnlineApply',
        name     : 'otherOnlineApply',
        component: resolve => {require(['@/components/OnlineApply/otherOnlineApply'], resolve);}
      },
      {
        title    : '预约时间表',
        path     : 'appointDate',
        name     : 'appointDate',
        server   : [123],
        component: resolve => {require(['@/components/OnlineApply/AppointDate'], resolve);},
      }
    ]
  },

  {
    title    : '线下审核',
    path     : '/offlineChk',
    name     : 'offlineChk',
    icon     : 'icon-xianxiashenhe-',
    component: Home,
    children : [
      {
        title    : '我的审核',
        path     : 'myChk',
        name     : 'myChk',
        component: resolve => {require(['@/components/OfflineChk/MyChk/myChk'], resolve);}
      },
      {
        title    : '监控所有审核',
        path     : 'monitorAllChks',
        name     : 'monitorAllChks',
        component: resolve => {require(['@/components/OfflineChk/MonitorAllChks/monitorAllChks'], resolve);}
      },
      {
        title    : '审核流程',
        path     : 'reviewProcess',
        name     : 'reviewProcess',
        component: resolve => {require(['@/components/OfflineChk/ReviewProcess/reviewProcess'], resolve);}
      },
      {
        title    : '组织架构及审核帐号',
        path     : 'organizationAuditAcc',
        name     : 'organizationAuditAcc',
        admin    : true,
        component: resolve => {require(['@/components/OfflineChk/OrganizationAuditAcc/organizationAuditAcc'], resolve);}
      }
    ]
  },
  {
    title    : '已完结',
    path     : '/done',
    name     : 'done',
    icon     : 'icon-wancheng-',
    component: Home,
    children : [
      {
        path     : 'index',
        name     : 'done',
        component: resolve => {require(['@/components/Done/Done'], resolve);}
      }
    ]
  },
  {
    title    : '平台管理',
    path     : '/platformManagement',
    name     : 'platformManagement',
    icon     : 'icon-pingtaiguanli-',
    component: Home,
    children : [
      {
        title    : '通知',
        path     : 'notification',
        name     : 'notification',
        component: resolve => {require(['@/components/PlatformManagement/notice/notification'], resolve);},
      },
      {
        title    : '帮扶',
        path     : 'assist',
        name     : 'assist',
        component: resolve => {require(['@/components/PlatformManagement/assist/Assist'], resolve);}
      },
      {
        title    : '快速政策匹配',
        path     : 'policymatch',
        name     : 'policymatch',
        component: resolve => {require(['@/components/PlatformManagement/policymatch/policymatch'], resolve);},
      }
    ]
  },
  {
    title    : '企业审核',
    path     : '/checkInformation',
    name     : 'checkInformation',
    icon     : 'icon-zhuanxiezhengce-',
    component: Home,
    children : [
      {
        title    : '注册审核',
        path     : 'approval',
        name     : 'approval',
        component: resolve => {require(['@/components/checkInformation/approval'], resolve);},
      },
      {
        title    : '审核记录',
        path     : 'checkInfo',
        name     : 'checkInfo',
        component: resolve => {require(['@/components/checkInformation/checkInfo'], resolve);}
      }
    ]
  },
  {
    title    : '设置',
    path     : '/setting',
    name     : 'setting',
    icon     : 'icon-shezhi-',
    component: Home,
    children : [
      {
        path     : 'index',
        name     : 'setting',
        component: resolve => {require(['@/components/Setting/Setting'], resolve);}
      }
    ]
  }
]

export const routers = [
  OrtherPage,
  ...appRouter,
  {
    path      : '/login',
    name      : 'Login',
    components: {
      blank: resolve => {require(['@/components/Login/Login'], resolve);},
    }
  },
  {
    path      : '/reminder',
    name      : 'reminder',
    components: {
      blank: resolve => {require(['@/components/Login/reminder'], resolve);},
    }
  }
]

// export const ReminderPage = {
//   path       : 'reminder',
//   name       : 'reminder',
//   components : {
//     blank: resolve => {require(['@/components/Login/reminder'], resolve);}
//   }
// }

